home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
edit
/
e4dv203.zip
/
E4D.DOC
< prev
next >
Wrap
Text File
|
1994-10-10
|
6KB
|
175 lines
************************************************************************
E4-Deluxe Documentation
(C) Copyright Neil Faulks 1993. All Rights Reserved.
Created 15th July 1993, Last Modified 2nd October 1994
************************************************************************
E4-Deluxe is an enhanced version of E4 that provides pull-down menus. It
is a separate product because
1) Pull-Down Menus are not part of the E4 Design Philosophy
2) The menu system adds quite a lot of code to the E4 executable.
This file describes the E4-Deluxe menu system.
Activating the Menus
E4-Deluxe has a built-in set of menus that are used by default.
However, the menu bar will not appear unless a key in the keymap
file (E4KEYS) is assigned the special keyname MENU. The supplied
E4KEYS file has an entry:
F10 MENU
Which causes the menu bar to be displayed on start up, and
allows the user access the menus by pressing F10.
Keymap Files
Both E4 and E4-Deluxe use the /= command line switch to select a
keymap file other that the default E4KEYS. For example
E4 /=TEST
would cause E4 to look for a keymap file called TEST.E4K
However in E4-Deluxe the same option also selects a menu file,
to be used instead of the built-in menu set. In the example
above (but using E4D) the menu file would have the name TEST.E4U
There is, therefore, a close relationship between a keymap file
and a menu file with the same name.
As mentioned in the section above, the keymap file must assign
the special MENU function to at least one key to make the menu
bar appear. The MENU function can also be used to assign a
particular pull-down menu to a key. For example you could make
ALT-F open the File menu by using the following entry in the
keymap file:
@F MENU F
This requires that the "F" in "File" is highlit on the menu bar.
The keymap file can be divided into sections, so that some key
assignments are made only if E4-Deluxe is used, whilst others
apply only to E4. Special headers, [menus] and [nomenus], are
used to separate the sections:
... Entries affecting both versions ...
[menus]
... Entries affecting only E4-Deluxe ...
[nomenus]
... Entries affecting only normal E4 ...
Several of the supplied keymap files use this technique. The
text between the headers can be any normal keymap file entries
including key and variable assignments and comments.
Menu Files
A menu file is a text file with the extension .E4U (E4
User-defined menu). Although a menu file appears to be fairly
free-format it is, in fact, subject to several restrictions,
which are described in the sections below.
The E4 menu system works by assigning a sequence of key presses
to a menu item, similar to the way keys are assigned different
functions in the E4KEYS file.
Menu File Format
<Top Menu>
<Menu 1, Item 1> <Keys> [<Description>]
<Menu 1, Item 2> <Keys> [<Description>]
<Menu 1, Item n> <Keys> [<Description>]
<Menu 2, Item 1> <Keys> [<Description>]
<Menu 2, Item 2> <Keys> [<Description>]
<Menu 2, Item n> <Keys> [<Description>]
The top menu must be the first line of the file.
One or more blank lines are used to separate menus, but there
must be no blank lines between menu items.
The fields <Item> <Keys> <Description> must be separated by a
SINGLE tab character. To get the menu to look nice when editing
set the tab size to something large, say 20.
Tilde characters (~) are used to highlight a (following) letter
in the Top Menu or a menu Item. Highlighted letter are used so
that the user can select menu items by pressing the
corresponding key. The case of the letter is not important.
<Item> Field
The item field is the text that is displayed on the
menu. A tilde preceding a letter causes it to be highlit
when the menu is displayed. The user may then select the
menu item by pressing the key coresponding to the
highlit letter.
<Keys> Field
The keys field is a list of keys, separated by spaces,
that are to be pressed when the user selects that menu
item. The Keys field can consist of two sub-fields,
separated by a semicolon. The first part is what is
displayed on the menu, the second part is the key list.
Either sub-field may be empty.
The list of keys to be pressed may start with an
exclamation sign (!), in which case the keys listed are
subject to any key mappings (key assigments) in effect.
Otherwise the keys are not subject to re-assignment and
always have their normal E4 meanings.
For example this entry is not affect by the keymap file,
^E would have to be defined as a macro:
Menu text ^E Item Description
This entry is affected by the keymap file (^E could be a
macro or a key assignment):
Menu text !^E Item Description
To avois the ! appearing in the display use a semicolon
to separate a list of keys that are displayed from those
that are actually pressed:
Menu text ^E;!^E Item Description
<Description> Field
The description is an optional string that is displayed
on the message line when the user places the selector
bar over that menu item.
Sample Menu File
~File ~Edit ~Special
~New @B @N Create a New file
~Open @L Open (Load) a file on disk
~Save @S @S Save current buffer to file
|E~xit @Q Quit the editor
Cu~t @X Cut block to clipboard
~Copy @C Copy block to clipboard
~Paste @V Insert contents of clipboard at cursor position
~Mark @A Mark a block to be Cut or Copied
Test ^A ~Macro ^A Invoke ^A macro
Test ^A ~Keymap !^A Invoke ^A via keymap file
Several menu files are supplied with the editor and these should
be examined for more examples.